import axios from '../utils/request';

/**
 * @description: 登录
 * @param {*} data
 * @return {*}
 */
export function Login(data) {
    return axios({
        method: 'post',
        url: '/Admin/Login',
        data: data
    });
}

/**
 * @description: 查询
 * @param {*} data
 * @return {*}
 */
export function Query(params) {
    return axios({
        method: 'get',
        url: '/Admin/Query',
        params: params
    });
}

/**
 * @description: 检查用户是否可用
 * @param {*} data
 * @return {*}
 */
export function CheckUserName(params) {
    return axios({
        method: 'get',
        url: '/Admin/CheckUserName',
        params: params
    });
}

/**
 * @description: 添加
 * @param {*} data
 * @return {*}
 */
export function Create(data) {
    return axios({
        method: 'post',
        url: '/Admin/Create',
        data: data
    });
}

/**
 * @description: 获取用户信息
 * @param {*} data
 * @return {*}
 */
 export function GetAdmin(params) {
    return axios({
        method: 'get',
        url: '/Admin/GetAdmin',
        params: params
    });
}

/**
 * @description: 更新
 * @param {*} data
 * @return {*}
 */
 export function Update(data) {
    return axios({
        method: 'post',
        url: '/Admin/Update',
        data: data
    });
}

/**
 * @description: 删除
 * @param {*} data
 * @return {*}
 */
 export function Delete(params) {
    return axios({
        method: 'get',
        url: '/Admin/Delete',
        params
    });
}

/**
 * @description: 批量删除
 * @param {*} data
 * @return {*}
 */
 export function ManyDelete(data) {
    return axios({
        method: 'post',
        url: '/Admin/ManyDelete',
        data: data
    });
}


/**
 * @description: 批量删除
 * @param {*} data
 * @return {*}
 */
 export function BulkDelete(data) {
    return axios({
        method: 'post',
        url: '/Admin/BulkDelete',
        data: data
    });
}